<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST, ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace admin\model;
use \temmoku\db;
class homemenu {
	public function all(){
		$rows=db::select('*')->from(jab.'home_menu')->where("sup= '0' AND state='0'")->orderByDESC(['reorder'])->query();
		$listDB=[];
		foreach($rows AS $row){
			$_rows=db::select('*')->from(jab.'home_menu')->where("sup= '$row[id]' AND state='0'")->orderByDESC(['reorder'])->query();
			if($_rows){
				$row['list']=$_rows;
			}
			$listDB[]=$row;
		}
		return $listDB;
	}
}
?>